import api from '@/api/helper'
/**
* jwtValidate
* @returns
*/
export const jwtValidate = async() => {
    var result = await api.post<string>(`test/jwt-validate`, {});
    if (api.check(result))
    {
        return result.data;
    }
    return null;
}
/**
* dic
* @param key:string 
* @param index:number 
* @param pageSize:number
* @returns
*/
export const dic = async(key:string ,index:number ,pageSize:number) => {
    var result = await api.get<Array<AppDicOut>>(`test/dic`, { 'key':key,'index':index,'pageSize':pageSize });
    if (api.check(result))
    {
        return result.data;
    }
    return null;
}
/**
* data
* @returns
*/
export const data = async() => {
    var result = await api.post<Result<string>>(`test/data`, {});
    if (api.check(result))
    {
        return result.data;
    }
    return null;
}
/**
* test
* @returns
*/
export const test = async() => {
    var result = await api.post<string>(`test/test`, {});
    if (api.check(result))
    {
        return result.data;
    }
    return null;
}
/**
* 测试打印码
* @param number:string
* @returns
*/
export const qrCode = async(number:string) => {
    var result = await api.get<any>(`test/qr-code`, { 'number':number });
    if (api.check(result))
    {
        return result.data;
    }
    return null;
}
